{//div的点击事件
    $("#card_1").click(function () {
        window.location.href = "./videoPlay.html";
    })
    $("#card_2").click(function () {
        window.location.href = "./videoPlay.html";
    })
    $("#card_3").click(function () {
        window.location.href = "./videoPlay.html";
    })
    $("#card_4").click(function () {
        window.location.href = "./videoPlay.html";
    })
    $("#card_5").click(function () {
        window.location.href = "./videoPlay.html";
    })
    $("#click_search_btn").click(function () {
        window.location.href = "./search.html";
    })

}

{//小飞机
    let plane=document.getElementById('plane');
    let deg=0,ex=0,ey=0,vx=0,vy=0,count=0;
    window.addEventListener('mousemove',(e)=>{
        ex=e.x-plane.offsetLeft-plane.clientWidth/2;
        ey=e.y-plane.offsetTop-plane.clientHeight/2;
        deg=360*Math.atan(ey/ex)/(2*Math.PI)+45;
        if(ex<0){
            deg+=180;
        }
        count=0;
    })
    function draw(){
        plane.style.transform='rotate('+deg+'deg)';
        if(count<100){
            vx+=ex/105;
            vy+=ey/110;
        }
        plane.style.left=vx+'px';
        plane.style.top=vy+'px';
        count++;
    }
    setInterval(draw, 1);
}